import 'package:json_annotation/json_annotation.dart';
import 'package:zhaoxiaowu_app/models/accounting_detail_type.dart';
import 'package:zhaoxiaowu_app/models/user.dart';

part 'accounting_detail.g.dart';

@JsonSerializable()
class AccountingDetail {
  final int? action;
  final String? date;
  final String? desc;
  final int? id;
  final double? money;
  @JsonKey(name: "t_id")
  final int? tId;
  @JsonKey(name: "u_id")
  final int? uId;
  final AccountingDetailType? type;
  final User? user;

  AccountingDetail({
    this.action,
    this.date,
    this.desc,
    this.id,
    this.money,
    this.tId,
    this.uId,
    this.type,
    this.user,
  });

  factory AccountingDetail.fromJson(Map<String, dynamic> json) => _$AccountingDetailFromJson(json);
  Map<String, dynamic> toJson() => _$AccountingDetailToJson(this);
}
